<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
	<form action="?">
		<div class="tt">汽车批发搜索</div>
		<input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
		<input type="hidden" name="action" value="<?php echo $action;?>"/>
		<input type="hidden" name="file" value="sale"/>
		<table cellpadding="2" cellspacing="1" class="tb">
			<tr>
				<td>
					&nbsp;<?php echo $fields_select;?>&nbsp;
					<input type="text" size="30" name="kw" value="<?php echo $kw;?>" title="关键词"/>&nbsp;
					<?php echo $order_select;?>&nbsp;
					<input type="text" name="psize" value="<?php echo $pagesize;?>" size="2" class="t_c" title="条/页"/>
					<input type="submit" value="搜 索" class="btn"/>&nbsp;
					<input type="button" value="重 置" class="btn" onclick="window.location='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=<?php echo $action;?>';"/>
				</td>
			</tr>
			<tr>
				<td>
					&nbsp;<select name="datetype">
						<option value="addtime" <?php if ($datetype == 'addtime') echo 'selected';?>>报名日期</option>
					</select>&nbsp;
					<?php echo Post::calender('fromdate', $fromdate, 'width:90'); ?>至 <?php echo Post::calender('todate', $todate, 'width:90'); ?>&nbsp;
				</td>
			</tr>
		</table>
	</form>
	<form method="post">
		<div class="tt"><?php echo $menus[$menuid][0];?></div>
		<table cellpadding="2" cellspacing="1" class="tb">
			<tr>
				<th width="25"><input type="checkbox" onclick="checkall(this.form);"/></th>
				<th width="100">客户姓名</th>
				<th width="100">客户电话</th>
				<th width="180">联系地址</th>
				<th width="100">申请会员</th>
				<th width="100">报名时间</th>
				<th width="100">操作</th>
			</tr>
			<?php foreach ($lists as $k => $v) { ?>
				<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
					<td><input type="checkbox" name="itemid[]" value="<?php echo $v['itemid'];?>"/></td>
					<td ><?php echo $v['truename'];?> <?php if(OwnCardModule::checkExpire($v['username'])){?><img src="<?php echo CSSIMG_URL?>member/owner.gif" title="讯都车主用户" valign="middle"><?php } ?></td>
					<td ><?php echo $v['mobile'];?> </td>
					<td ><?php echo $v['address'];?> </td>
					<td>
						<?php if ($v['username']) { ?>
							<a href="javascript:_user('<?php echo $v["username"];?>');"><?php echo $v['username'];?></a>
						<?php } else { ?>
							<a href="javascript:_ip('<?php echo $v["ip"];?>');" title="游客"><?php echo $v['ip'];?></a>
						<?php } ?>
					</td>
					<td class="px11" title="申请时间"><?php echo date('Y-m-d H:i',$v['addtime']);?></td>
					<td>
						<a href="javascript:_sale('<?php echo $v["itemid"];?>');">查看</a>
						<a href="?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=delete&itemid=<?php echo $v['itemid'];?>" onclick="return _delete();">删除</a>
					</td>
				</tr>
			<?php }?>
		</table>
		<div class="btns">
			<input type="submit" value=" 彻底删除 " class="btn" onclick="if(confirm('确定要删除选中车主信息吗？此操作将不可撤销')){this.form.action='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=delete'}else{return false;}"/>&nbsp;
			<input type="submit" value="批量导出 " class="btn" onclick="this.form.action='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=export&all=0';"/>
			<input type="submit" value="全部导出 " class="btn" onclick="this.form.action='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=export&all=1';"/>
		</div>
	</form>
	<div class="pages"><?php echo  $do->getPn()->render();?></br>
	<span>共<?php echo $items;?>条/<?php echo $do->getPn()->getPages();?>页&nbsp;
		<?php if ($do->getPn()->getPages()>1){;?>
		到第</span>
		<input type="text" name="page-num-input" id="xd_page_jump"/>
		<span>页</span>
		<button type="submit" onclick="xdChangeAndLocation('page', $('#xd_page_jump').val())">确定</button>
		<?php };?></div>
	<br/>
	<br/>
	<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>